var mainIndexCtrl = myApp.controller('mainIndexCtrl', ['$scope', '$rootScope',function($scope, $rootScope) {
	$rootScope.firstType = "index";
	$rootScope.secondType = "";
	// 初始化
	function init() {
		$(document).ready(function() {
			setEasyPie();
			setTimeout(function () {
				setSwiper();
			}, 1);
		});
	}
	init();

	// 设置轮播
	function setSwiper() {
		 var mySwiper = new Swiper ('#infoSwiper', {
		    loop: true,
		    paginationClickable: true,
		    // 如果需要分页器
		    pagination: '.swiper-pagination'
		})      
	}
	// 设置easypie
	function setEasyPie() {
		$('.percentage').easyPieChart({  
	        animate: 1000,
	        lineWidth: 5,
            lineCap:'circle',
            scaleColor: false, 
            size: 100
	    });
	}
}]);